﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class FrontPages_Reviews : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.UrlReferrer != null)
            {
                ReviewsList.HostName = Request.UrlReferrer.Host;
            }
            else {
                ReviewsList.HostName = "localhost";
            }
          
            ReviewsList.PageSize = StringHelper.FormatObjToInt(Request["num"]);

            string ID = Request["ID"]; //详细页下一条下一条进来
            if (string.IsNullOrEmpty(ID))
            {
                ID = Request.UrlReferrer.Query.Replace("?ID=", ""); //列表页点进来

            }
            string[] arr = ID.Split('&');
            if (arr != null && arr.Length > 0)
            {
                //NewsDetail.HostName = "www.ilenor.cc";
                ReviewsList.InitReviewsList(arr[0]);
            }
            else
            {
                ReviewsList.InitReviewsList("");
            }

          

        }
    }
}